@layout("/common/_container.html"){
<style rel="https://cdnjs.cloudflare.com/ajax/libs/jquery-bootgrid/1.3.1/jquery.bootgrid.css"></style>
<div class="row">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>收货地址管理</h5>
            </div>
            <div class="ibox-content">
                <div class="modal fade" id="detail-mod">
                    　　<div class="modal-dialog" style="height: 700px ;width:900px">
                    　　　　<div class="modal-content" id="detail-content">
                    　　　　</div>
                    　　</div>
                </div>
                <table id="grid-data" class="table table-bordered table-hover">
                    　　<thead>
                　　　　<tr>
                    　　　　　　<th data-column-id="address">地址</th>
                    　　　　　　<th data-column-id="name">姓名</th>
                    　　　　　　<th data-column-id="phone"> 手机</th>
                    　　　　　　<th data-column-id="link" data-formatter="commands" data-sortable="false">详细</th>
                    　　</tr>
                　　</thead>
                </table>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function(){
        $("#grid-data").bootgrid({
            ajax: true, //是否发生异步请求
            url: "${ctxPath}/address/list", //请求的Url  返回json格式数据
            formatters: {
                "commands": function (column, row) { //commands 参考上面 data-formatter="commands"  与前面一致即可
                    return "<a href=\"#\" onclick='detail(this)' class=\"command-detail\" data-row-id=\"" + row.id + "\">详细</a>&nbsp;" +
                        "<a href=\"#\" onclick='edit(this)' class=\"command-edit\" data-row-id=\"" + row.id + "\">编辑</a>&nbsp;" +
                        "<a href=\"#\" onclick='delete2(this)' class=\"command-delete\" data-row-id=\"" + row.id + "\">删除</a>&nbsp;";
                }
            }
        }).on("loaded.rs.jquery.bootgrid", function (a) {
           console.log(a);
        });
    });
    function detail(a){
        console.log(a);
    }
    function edit(a){
        console.log(a);
    }
    function delete2(a){
        console.log(a);
    }
</script>
@}